package cn.jg.framework.auth.session;


import cn.jg.framework.auth.model.User;

public class ThreadLocalUser {
	private static final ThreadLocal<User> USER_THREAD_LOCAL = new InheritableThreadLocal<>();

	public static void set(final User user) {
		USER_THREAD_LOCAL.set(user);
	}

	public static User get() {
		return USER_THREAD_LOCAL.get();
	}

	public static void remove() {
		USER_THREAD_LOCAL.remove();
	}

}
